package cn.lanqiao.ui;

import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.SimpleFormatter;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.border.EtchedBorder;

import cn.lanqiao.entity.User;
import cn.lanqiao.util.ReadFile;

public class FriendInforFrm extends JFrame {

	private JPanel contentPane;
	private User user;
	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					FriendInforFrm frame = new FriendInforFrm();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public FriendInforFrm() {
		setTitle("好友信息");//该主窗体的主题
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 791, 470);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JPanel panel = new JPanel();
		panel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
		panel.setBounds(10, 13, 367, 217);
		contentPane.add(panel);
		panel.setLayout(null);
		
		JLabel lblNewLabel = new JLabel("New label");
		lblNewLabel.setIcon(new ImageIcon("src\\cn\\lanqiao\\source\\userface.jpg"));//加载用户头像
		lblNewLabel.setBounds(0, 0, 204, 217);
		panel.add(lblNewLabel);
		
		JLabel lblId = new JLabel("ID");
		lblId.setBounds(218, 24, 72, 18);
		panel.add(lblId);
		
		JLabel lblNewLabel_1 = new JLabel("new label");
		lblNewLabel_1.setBounds(218, 55, 122, 18);
		//lblNewLabel_1.setText(this.user.getUserid());
		panel.add(lblNewLabel_1);
		
		JLabel label = new JLabel("个性签名");
		label.setBounds(218, 86, 72, 18);
		panel.add(label);
		
		JLabel lblNewLabel_2 = new JLabel("new label");
		lblNewLabel_2.setBounds(218, 117, 135, 18);
		//lblNewLabel_2.setText(this.user.getSign());
		panel.add(lblNewLabel_2);
		
		JLabel label_1 = new JLabel("最后登录时间");
		label_1.setBounds(218, 148, 97, 18);
		panel.add(label_1);
		
		SimpleDateFormat slf = new SimpleDateFormat("yyyy-MM-dd");
		
		JLabel lblNewLabel_3 = new JLabel("new label");
		lblNewLabel_3.setBounds(218, 179, 104, 18);
		lblNewLabel_3.setText((slf.format(new Date())));
		panel.add(lblNewLabel_3);
		
		JPanel panel_1 = new JPanel();
		panel_1.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
		panel_1.setBounds(10, 243, 746, 171);
		contentPane.add(panel_1);
		panel_1.setLayout(null);
		
		JLabel label_2 = new JLabel("段位");
		label_2.setBounds(39, 140, 30, 18);
		panel_1.add(label_2);
		
		JLabel lblNewLabel_4 = new JLabel("New label");
		lblNewLabel_4.setIcon(new ImageIcon(ReadFile.readFile("src\\\\cn\\\\lanqiao\\\\source\\\\U_Level",this.user.getU_Level())));
		lblNewLabel_4.setBounds(46, 31, 94, 96);
		panel_1.add(lblNewLabel_4);
		
		JLabel label_3 = new JLabel("总场次");
		label_3.setBounds(239, 31, 72, 18);
		panel_1.add(label_3);
		
		JLabel label_4 = new JLabel("胜率");
		label_4.setBounds(388, 31, 72, 18);
		panel_1.add(label_4);
		
		JLabel lblMvp = new JLabel("MVP场数");
		lblMvp.setBounds(527, 31, 72, 18);
		panel_1.add(lblMvp);
		
		JLabel label_5 = new JLabel("战斗力");
		label_5.setBounds(239, 109, 72, 18);
		panel_1.add(label_5);
		
		JLabel label_6 = new JLabel("英雄数");
		label_6.setBounds(388, 109, 72, 18);
		panel_1.add(label_6);
		
		JLabel label_7 = new JLabel("皮肤数");
		label_7.setBounds(527, 109, 72, 18);
		panel_1.add(label_7);
		
		JLabel lblNewLabel_5 = new JLabel("New label");
		lblNewLabel_5.setBounds(226, 62, 72, 18);
		lblNewLabel_5.setText(new Integer(this.user.getTotalNum()).toString());
		panel_1.add(lblNewLabel_5);
		
		JLabel lblNewLabel_6 = new JLabel("New label");
		lblNewLabel_6.setBounds(366, 62, 72, 18);
		lblNewLabel_6.setText(new Float(this.user.getWinNum()).toString());
		panel_1.add(lblNewLabel_6);
		
		JLabel lblNewLabel_7 = new JLabel("New label");
		lblNewLabel_7.setBounds(513, 62, 72, 18);
		lblNewLabel_7.setText(new Integer(this.user.getMVPNum()).toString());//打印用户的MVP场数
		panel_1.add(lblNewLabel_7);
		
		JLabel lblNewLabel_8 = new JLabel("New label");
		lblNewLabel_8.setBounds(226, 140, 72, 18);
		lblNewLabel_8.setText(new Integer(this.user.getWinNum()).toString());//打印用户胜利的场数
		panel_1.add(lblNewLabel_8);
		
		JLabel lblNewLabel_9 = new JLabel("New label");
		lblNewLabel_9.setBounds(366, 140, 72, 18);
		lblNewLabel_9.setText(new Integer(this.user.getHeroNum()).toString());//打印用户英雄数量
		panel_1.add(lblNewLabel_9);
		
		JLabel lblNewLabel_10 = new JLabel("New label");
		lblNewLabel_10.setBounds(513, 140, 72, 18);
		lblNewLabel_10.setText(new Integer(this.user.getSkinNum()).toString());//打印用户皮肤数量
		panel_1.add(lblNewLabel_10);
		
		JLabel lblNewLabel_11 = new JLabel("New label");
		lblNewLabel_11.setBounds(613, 31, 119, 127);
		panel_1.add(lblNewLabel_11);
		
		JLabel lblNewLabel_20 = new JLabel("New label");
		lblNewLabel_20.setBounds(83, 140, 72, 18);
		lblNewLabel_20.setText(this.user.getU_Level());//打印用户段位
		panel_1.add(lblNewLabel_20);
		
		JPanel panel_3 = new JPanel();
		panel_3.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
		panel_3.setBounds(391, 13, 366, 217);
		contentPane.add(panel_3);
		panel_3.setLayout(null);
		
		JLabel label_9 = new JLabel("常用英雄");
		label_9.setBounds(10, 42, 72, 18);
		panel_3.add(label_9);
		
		JLabel lblNewLabel_16 = new JLabel("常用英雄1");
		lblNewLabel_16.setBounds(10, 80, 103, 93);
		panel_3.add(lblNewLabel_16);
		
		JLabel lblNewLabel_17 = new JLabel("常用英雄2");
		lblNewLabel_17.setBounds(135, 80, 103, 93);
		panel_3.add(lblNewLabel_17);
		
		JLabel lblNewLabel_18 = new JLabel("常用英雄3");
		lblNewLabel_18.setBounds(252, 80, 100, 93);
		panel_3.add(lblNewLabel_18);
		this.setResizable(false);
	}
}